import axios from 'axios'

//设置密保问题
export const securitySettings = params => {
   return axios({
      method: 'post',
      url:`/account/sysuser/setQuestion`,
      params
    })
}
//查询密保问题集合
export const securityQuestion  = () => {
  return axios({
     method: 'get',
     url:`/account/sysuser/questionList`,
   })
}
//发送邮件 
export const sendmail = params => {
  return axios({
     method: 'post',
     url:`/account/sysuser/requestMail`,
     params
   })
}
// 修改手机号
export const ModifyThePhoneNumber = params => {
   return axios({
      method: 'put',
      url:`/account/sysuser/updatePhone`,
      params
    })
 }
 export const sedCode = phone => {
   return axios({
      method: 'get',
      url:`/uc/remote/sms/verify-code/${phone}`,   
    })
 }
 //校验验证码是否正确
 export const verifyCode = (code,phone) => {
   return axios({
      method: 'get',
      url:`/uc/remote/sms/verify-code/check/phone/${phone}/code/${code}`,   
    })
 }
//用户注销
export const cancelled = params => {
   return axios({
      method: 'DELETE',
      url:`/account/sysuser/cancel`,
      params
    })
}
//修改密码
export const changePassword  = data => {
   return axios({
      method: 'POST',
      url:`/account/sysuser/updatePwd`,
      data
    })
}
//更新user info信息
export const updateUserinfo = params => {
   return axios({
     method: 'get',
     url:'/account/sysuser/current',//
     params
   })
 }
